#include <stdio.h>
#include <stdlib.h>


#define MAX 1024
int main(){
    FILE *file;
    char buf[MAX];
    int n;
    int letter = 0,blank = 0, number = 0;
    file = fopen("cpptime.cpp","r");
    if(file == NULL){
        perror("fail to open");
        exit(1);
    }
    while((n=fread(buf,sizeof(char),MAX,file))>0){
        int i;
        for(i=0;i<n;i++){
            if(buf[i] >='0' && buf[i]<='9'){
                number ++;
            }else if(buf[i]== ' '){
                blank ++;
            }else{
                letter ++;
            }
        }
    }

    printf("%d,%d,%d\n",number,blank,letter);
    fclose(file);
    return 0;
}